#ifndef _MUSIC_H_
#define _MUSIC_H_

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
}
#endif

#include <thread>
#include <string>
#include <mutex>
#include <string.h>
#include "Music_gui.h"

using namespace std;

class Music;

class Music
{
public:


private:
    thread *pthread;         //独立于UI的线程
    bool thread_exit_flag;          //线程退出标志
    int musicNum;       //保存音乐数目
public:
    Music(exit_cb_t exit_cb, mutex &UIMutex);
    ~Music();
    
    const bool getExitFlag() const { return thread_exit_flag; }
    const int getMusicNum() const { return musicNum; }

    int searchMusic(string path);
};



#endif